package acm.蓝桥5;

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        int n = sc.nextInt();
        if (n>20){
            System.out.println("0.61803399");
            return;
        }
        if (n==1){
            System.out.println("1.00000000");
            return;
        }else if (n==2){
            System.out.println("0.50000000");
            return;
        }
       long[] res = fun(n+1);
        System.out.printf("%.8f",1.0*res[0]/res[1]);
    }

    public static long[] fun(int n) {
        long[] res ={1,1};
        int h = 0, t = 1;
        while (n-- > 2) {
            res[t] = res[h] + res[t];
            h = (h + 1) % 2;
            t = (t + 1) % 2;
        }
        return new long[]{res[t], res[h]};
    }
}
